<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/file/FileTools.cpp 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_f17c642dae9e225ab953fe9c6da2e34a.html">file</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">FileTools.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_file_tools_8cpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;../tools/ShareApi.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_file_tools_8h.html">FileTools.h</a>&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;../thread/SharedPtr.h&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="_file_tools_8h.html#abaea96d345c10cbf7383204c02924c61">   10</a></span>&#160;<a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <span class="keywordtype">int</span> <a class="code" href="_file_tools_8cpp.html#abaea96d345c10cbf7383204c02924c61">txt_code</a>(<span class="keyword">const</span> <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* filename)</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;{</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    FILE *tmpfile = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#ifdef WIN32</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    _tfopen_s(&amp;tmpfile, filename, <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="stringliteral">&quot;rb&quot;</span>));</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    tmpfile = <a class="code" href="tools_8h.html#a65d483a46d24b40308cab4b44d147d7f">_tfopen</a>(filename, <span class="stringliteral">&quot;rb&quot;</span>);</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keywordflow">if</span>(tmpfile == <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <a class="code" href="class_shared_ptr.html">SharedPtr&lt;FILE&gt;</a> file(tmpfile, &amp;fclose);</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="comment">//先读上2个字节   </span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> p_buf;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="keywordflow">if</span> (fread(&amp;p_buf, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>), 1, file.<a class="code" href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">Get</a>()) &lt; 1) <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="keywordtype">int</span>  p = p_buf * 256;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keywordflow">if</span> (fread(&amp;p_buf, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>), 1, file.<a class="code" href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">Get</a>()) &lt; 1) <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    p = p_buf + p;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="comment">//int n=1;//实际读取的字节数</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordtype">int</span> code = 0;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keywordflow">switch</span>(p)</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    {   </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordflow">case</span>   0xefbb:<span class="comment">//&quot;UTF-8&quot; </span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        code = <a class="code" href="_file_tools_8h.html#a3eadf18e20deff5b6afa39586702080c">TXT_UTF8</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordflow">case</span>   0xfffe:  <span class="comment">// unicode小端格式</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        code = <a class="code" href="_file_tools_8h.html#a57a9aad0b18214bd111a8dd774e7dca0">TXT_UNICODE</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordflow">case</span>   0xfeff: <span class="comment">// unicode大端格式</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        code = <a class="code" href="_file_tools_8h.html#a57a9aad0b18214bd111a8dd774e7dca0">TXT_UNICODE</a>;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordflow">break</span>;   </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">default</span>:  <span class="comment">//ANSI </span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        code = <a class="code" href="_file_tools_8h.html#a619c9458df99c20ae24af99acf244afe">TXT_ANSI</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    }</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordflow">return</span> code;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;}</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="_file_tools_8h.html#ac466c2c83e8a6b7daf322c2ad4590e0f">   50</a></span>&#160;<a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <span class="keywordtype">bool</span> <a class="code" href="_file_tools_8cpp.html#ac466c2c83e8a6b7daf322c2ad4590e0f">CreateMultiDir</a>(<span class="keyword">const</span> <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* szPath)</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;{</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    assert(szPath);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordflow">if</span> (szPath == <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a> szTmpPath[<a class="code" href="tools_8h.html#ab99ded389af74001a6298fc9e44e74e5">MAX_PATH</a>] = { 0 };</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a> *pTmpPath = szTmpPath;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="comment">// 跳过当前目录</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="tools_8h.html#aa268b3f86c63382be0f3d63e399f1cdb">_tcsncmp</a>(szPath, <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="stringliteral">&quot;./&quot;</span>), 2) == 0 || <a class="code" href="tools_8h.html#aa268b3f86c63382be0f3d63e399f1cdb">_tcsncmp</a>(szPath, <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="stringliteral">&quot;.\\&quot;</span>), 2) == 0) szPath += 2;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordflow">while</span> (*szPath != <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;\0&#39;</span>))</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    {</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordflow">if</span> (*szPath == <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;/&#39;</span>) || *szPath == <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;\\&#39;</span>))</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        {</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            <span class="keywordflow">if</span> (*szTmpPath != 0)</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                <span class="comment">// 判断目录是否存在，不存在则创建</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                <span class="keywordflow">if</span> (!<a class="code" href="namespace_share_api.html#af5477174100c9b0c5fa9b8a1787c09af">ShareApi::FilePathExists</a>(szTmpPath))</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                    <span class="keywordflow">if</span> (!<a class="code" href="namespace_share_api.html#a2a12b9ef4412b9abb4848f65ffa2850e">ShareApi::CreateDirectory</a>(szTmpPath)) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                <span class="comment">// 增加分隔符</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                *pTmpPath++ = <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;/&#39;</span>);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                <span class="comment">// 空字符串代表当前目录</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                *pTmpPath++ = <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;.&#39;</span>);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                *pTmpPath++ = <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;/&#39;</span>);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        {</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;            <span class="comment">// 拷贝目录</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            *pTmpPath++ = *szPath;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        ++szPath;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="comment">// 对于无分隔符结尾的在判断一次</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="namespace_share_api.html#af5477174100c9b0c5fa9b8a1787c09af">ShareApi::FilePathExists</a>(szTmpPath))</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="namespace_share_api.html#a2a12b9ef4412b9abb4848f65ffa2850e">ShareApi::CreateDirectory</a>(szTmpPath)) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="_file_tools_8h.html#af3a9da349722ad9a78cc85e12bcbaee1">   99</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="_file_tools_8cpp.html#a3c04dd3001c03a53ff0af77a61ac93f4">PathRemoveBackslash</a>(<a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* sPath)</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;{</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordtype">size_t</span> size = <a class="code" href="tools_8h.html#ad253c68ce58b12b277fedc2d785d7977">_tcslen</a>(sPath);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    --size;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">if</span> (sPath[size] == <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;\\&#39;</span>) || sPath[size] == <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;/&#39;</span>)) sPath[size] = <a class="code" href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a>(<span class="charliteral">&#39;\0&#39;</span>);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;}</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="a_file_tools_8h_html_a3eadf18e20deff5b6afa39586702080c"><div class="ttname"><a href="_file_tools_8h.html#a3eadf18e20deff5b6afa39586702080c">TXT_UTF8</a></div><div class="ttdeci">#define TXT_UTF8</div><div class="ttdoc">UTF8编码</div><div class="ttdef"><b>Definition:</b> <a href="_file_tools_8h_source.html#l00006">FileTools.h:6</a></div></div>
<div class="ttc" id="atools_8h_html_a65c91f8d7af3c67b8a21e089fdddd0fe"><div class="ttname"><a href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a></div><div class="ttdeci">#define TCHAR</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00187">tools.h:187</a></div></div>
<div class="ttc" id="a_file_tools_8h_html_a57a9aad0b18214bd111a8dd774e7dca0"><div class="ttname"><a href="_file_tools_8h.html#a57a9aad0b18214bd111a8dd774e7dca0">TXT_UNICODE</a></div><div class="ttdeci">#define TXT_UNICODE</div><div class="ttdoc">UNICODE编码</div><div class="ttdef"><b>Definition:</b> <a href="_file_tools_8h_source.html#l00005">FileTools.h:5</a></div></div>
<div class="ttc" id="atools_8h_html_a5fc7b9645f751ccc053f6f59ab0d8924"><div class="ttname"><a href="tools_8h.html#a5fc7b9645f751ccc053f6f59ab0d8924">TEXT</a></div><div class="ttdeci">#define TEXT(str)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00195">tools.h:195</a></div></div>
<div class="ttc" id="atools_8h_html_ad253c68ce58b12b277fedc2d785d7977"><div class="ttname"><a href="tools_8h.html#ad253c68ce58b12b277fedc2d785d7977">_tcslen</a></div><div class="ttdeci">#define _tcslen</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00189">tools.h:189</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr</a></div><div class="ttdoc">智能指针</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00119">SharedPtr.h:119</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0f15d2d3d2834b0667791f3abfd9e0d7"><div class="ttname"><a href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">SharedPtr::Get</a></div><div class="ttdeci">Ty * Get()</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00202">SharedPtr.h:202</a></div></div>
<div class="ttc" id="a_file_tools_8cpp_html_a3c04dd3001c03a53ff0af77a61ac93f4"><div class="ttname"><a href="_file_tools_8cpp.html#a3c04dd3001c03a53ff0af77a61ac93f4">PathRemoveBackslash</a></div><div class="ttdeci">void PathRemoveBackslash(TCHAR *sPath)</div><div class="ttdoc">去除路径最后的反斜杠</div><div class="ttdef"><b>Definition:</b> <a href="_file_tools_8cpp_source.html#l00099">FileTools.cpp:99</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="atools_8h_html_a64152c8b939d1ce06c7c5cb6c97b62f8"><div class="ttname"><a href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a></div><div class="ttdeci">#define LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00095">tools.h:95</a></div></div>
<div class="ttc" id="a_file_tools_8h_html"><div class="ttname"><a href="_file_tools_8h.html">FileTools.h</a></div></div>
<div class="ttc" id="atools_8h_html_aa268b3f86c63382be0f3d63e399f1cdb"><div class="ttname"><a href="tools_8h.html#aa268b3f86c63382be0f3d63e399f1cdb">_tcsncmp</a></div><div class="ttdeci">#define _tcsncmp</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00193">tools.h:193</a></div></div>
<div class="ttc" id="atools_8h_html_a65d483a46d24b40308cab4b44d147d7f"><div class="ttname"><a href="tools_8h.html#a65d483a46d24b40308cab4b44d147d7f">_tfopen</a></div><div class="ttdeci">#define _tfopen</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00200">tools.h:200</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="atools_8h_html_ab99ded389af74001a6298fc9e44e74e5"><div class="ttname"><a href="tools_8h.html#ab99ded389af74001a6298fc9e44e74e5">MAX_PATH</a></div><div class="ttdeci">#define MAX_PATH</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00149">tools.h:149</a></div></div>
<div class="ttc" id="a_file_tools_8cpp_html_ac466c2c83e8a6b7daf322c2ad4590e0f"><div class="ttname"><a href="_file_tools_8cpp.html#ac466c2c83e8a6b7daf322c2ad4590e0f">CreateMultiDir</a></div><div class="ttdeci">LIBTOOLS bool CreateMultiDir(const TCHAR *szPath)</div><div class="ttdoc">创建多级目录</div><div class="ttdef"><b>Definition:</b> <a href="_file_tools_8cpp_source.html#l00050">FileTools.cpp:50</a></div></div>
<div class="ttc" id="a_file_tools_8h_html_a619c9458df99c20ae24af99acf244afe"><div class="ttname"><a href="_file_tools_8h.html#a619c9458df99c20ae24af99acf244afe">TXT_ANSI</a></div><div class="ttdeci">#define TXT_ANSI</div><div class="ttdoc">GBK编码</div><div class="ttdef"><b>Definition:</b> <a href="_file_tools_8h_source.html#l00007">FileTools.h:7</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="anamespace_share_api_html_af5477174100c9b0c5fa9b8a1787c09af"><div class="ttname"><a href="namespace_share_api.html#af5477174100c9b0c5fa9b8a1787c09af">ShareApi::FilePathExists</a></div><div class="ttdeci">LIBTOOLS BOOL FilePathExists(const TCHAR *szFileName)</div><div class="ttdoc">检查文件是否存在</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l00474">ShareApi.cpp:474</a></div></div>
<div class="ttc" id="a_file_tools_8cpp_html_abaea96d345c10cbf7383204c02924c61"><div class="ttname"><a href="_file_tools_8cpp.html#abaea96d345c10cbf7383204c02924c61">txt_code</a></div><div class="ttdeci">DEF_BEG_LIBTOOLS LIBTOOLS int txt_code(const TCHAR *filename)</div><div class="ttdoc">判定文本文件的编码方式</div><div class="ttdef"><b>Definition:</b> <a href="_file_tools_8cpp_source.html#l00010">FileTools.cpp:10</a></div></div>
<div class="ttc" id="anamespace_share_api_html_a2a12b9ef4412b9abb4848f65ffa2850e"><div class="ttname"><a href="namespace_share_api.html#a2a12b9ef4412b9abb4848f65ffa2850e">ShareApi::CreateDirectory</a></div><div class="ttdeci">LIBTOOLS BOOL CreateDirectory(const TCHAR *szPathName)</div><div class="ttdoc">创建目录</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l00497">ShareApi.cpp:497</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
